package cn.wind.xboot.conf.config;

import com.google.common.collect.Lists;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * <p>Title: XbootConfiguration</p>
 * <p>Description: TODO</p>
 *
 * @author xukk
 * @version 1.0
 * @date 2018/9/10
 */
@Slf4j
@Configuration
@ConfigurationProperties(prefix = "xboot")
@Data
public class XbootConfiguration {
    private List<String> authenticatedUrl= Lists.newArrayList();
    private List<String> extendIgnoreUrl=Lists.newArrayList();
    private List<String> ignoredUrl=Lists.newArrayList();
    private XbootFilterConfiguration filter=new XbootFilterConfiguration();
    private XbootTableConfiguration table=new XbootTableConfiguration();
    private XbootUploadConfiguration upload=new XbootUploadConfiguration();
    private XbootDozerConfiguration dozer=new XbootDozerConfiguration();
    @Data
    public static class XbootDozerConfiguration{
        private String basename="";
    }
    @Data
    public  static  class XbootTableConfiguration {
        private String basePath="";
        private String outputDir="";
    }
    @Data
    public static class XbootUploadConfiguration {
        private String authRoot="";
    }
    @Data
    public static class XbootFilterConfiguration {
        private Long invalidTime=5000L;
    }
}
